package com.scf.fruit.util;

/**
 * @author : 孙超飞
 * @title :
 * @description :
 * @date : 2018-04-20 17:39
 */

public class PageReq {
    private Integer start;
    private Integer length=10;
    private Integer pageIndex=1;
    private int draw;

    public Integer getPageIndex() {
        return this.pageIndex = this.start / this.length + 1;
    }

    public PageReq() {
    }

    public PageReq(Integer start, Integer length, Integer pageIndex) {
        this.start = start;
        this.length = length;
        this.pageIndex = pageIndex;
    }

    public int getDraw() {
        return draw;
    }

    public void setDraw(int draw) {
        this.draw = draw;
    }

    public void setPageIndex(Integer pageIndex) {
        this.pageIndex = pageIndex;
    }

    public Integer getStart() {
        return start;
    }

    public void setStart(Integer start) {
        this.start = start;
    }

    public Integer getLength() {
        return length;
    }

    public void setLength(Integer length) {
        this.length = length;
    }
}
